import java.lang.Math;
public class Number3
{
	 public static void main(String[] args) {
	 	//调用绘图函数，参数是圆的半径
        paint(10); //半径40
    }
    public static void paint(int r) {
     //假定圆心在坐标(r,r);
        int y = r * 2; //y的坐标开始
        int x = 0;	//x的坐标开始
        int c = 0; //中间空格数量
        int z = 2; //每行递减量
        for (int j = r * 2; j >= 0; j=j-z) {
        	//获取画*点的坐标的x值
            x = getX(r, y);
            //先画y值上左边的*
            System.out.print(getSpace(x) + "*");
            c = (r-x)*2;//以圆心对应输出空格
            //再画该y值上右边的*
            System.out.println(getSpace(c) + "*");
            //每次y值递减
            y-=z;
        }
    }
    public static int getX(int r, int y) {
        //解圆标准方程的
        //(x-a)^2+(y-b)^2=r^2,其中a,b是圆心坐标,现在假定(r,r)作为圆心坐标
        //(x-r)^2+(y-b)^2=r^2
        //(x-r)^2=
        //x-r=Math.sqrt(r^2-(y-b)^2)
        //t=x-r r-t=x
        int x = y - r;       
        double t = Math.sqrt((r * r) - (x * x));
        return (int) Math.round(r-t);
    }
    public static String getSpace(int i) {
        String s = "";
        for (int j = 0; j < i; j++) {
            s += " ";
        }
        return s;
    }
}